import './assets/base.css';
import './assets/main.css';
import { createApp } from 'vue'
import App from './App.vue'
import router from './router'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import { createPinia } from 'pinia'
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate'
import zhCn from 'element-plus/es/locale/lang/zh-cn'

// 引入element-plus
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import './assets/css/element.scss'
const app = createApp(App)

// 注册el-icon组件
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
}

const pinia = createPinia()

app.use(router)
// 使用element-plus
app.use(pinia.use(piniaPluginPersistedstate))
app.use(ElementPlus, {
    locale: zhCn
})
app.mount('#app')
